a=int(input("vvedite 4 znachoe chislo"))
if a>=1000 and a<=9999:
    print("  4 znacnoe")
else:
        print("NE 4 znacnoe")
mi=4356756867
ma=-346547658
e=a%10
d=a%100//10
s=a%1000//100
t=a//1000
r=a//100
y=a//10%100
u=a%100
i=a//10
o=a%1000
p=a
if e>ma:
    ma=e
if d>ma:
    ma=d
if s>ma:
    ma=s
if t>ma:
    ma=t
if r>ma:
    ma=r
if y>ma:
    ma=y
if u>ma:
    ma=u
if i>ma:
    ma=i
if o>ma:
    ma=o
if p>ma:
    ma=p
print (t)
print (s)
print (d)
print (e)
print (r)
print (y)
print (u)
print (i)
print (o)
print (p)
print (ma)
